package 设计模式.decorator;

public class Decorator extends Drink{
    private Drink drink;
    public Decorator(Drink obj){
        this.drink=obj;
    }
    @Override
    public float cost() {
        return super.getPrice()+drink.getPrice();
    }

    @Override
    public String getDes() {
        return des+" "+getPrice()+"&&"+drink.getDes();
    }
}
